9 #include "Kameleon-plus-Config.h"
15 #include <boost/unordered_map.hpp>
30 class HDF5FileReader :
public FileReader
38 std::vector<float>* getVariable(
const std::string& variable);
39 std::vector<float>* getVariable(
long variable);
40 std::vector<float>* getVariable(
const std::string& variable,
long startIndex,
long count);
41 std::vector<float>* getVariable(
long variable,
long startIndex,
long count);
42 float getVariableAtIndex(
const std::string& variable,
long index);
43 float getVariableAtIndex(
long variable_id,
long index);
44 std::vector<int>* getVariableInt(
const std::string& variable);
45 int getVariableIntAtIndex(
const std::string& variable,
long index);
46 int getNumberOfGlobalAttributes();
47 int getNumberOfVariables();
48 int getNumberOfVariableAttributes();
49 long getNumberOfRecords(
const std::string& variable);
50 long getNumberOfRecords(
long variable_id);
51 long getVariableID(
const std::string& variable);
52 std::string getVariableName(
long variable_id);
53 Attribute getGlobalAttribute(
long i);
54 std::string getGlobalAttributeName(
long attribute_id);
55 std::string getVariableAttributeName(
long attribute_id);
56 Attribute getGlobalAttribute(
const std::string& attribute);
57 long getGlobalAttributeID(
const std::string& attribute);
58 Attribute getVariableAttribute(
const std::string& variable,
const std::string& attribute);
59 std::vector<std::string> getVariableAttributeNames();
60 bool doesAttributeExist(
const std::string& attribute);
61 bool doesVariableExist(
const std::string& variable);
62 const std::string& getCurrentFilename();
63 virtual ~HDF5FileReader();
67 std::string current_filename;
68 H5::H5File * current_file;
69 H5::Group * rootGroup;
70 H5::Group * variableGroup;
72 long openFile(
const std::string& filename,
bool readonly);
73 void initializeGlobalAttributes();
74 void initializeVariableAttributes();
75 void initializeVariableIDs();
76 void initializeVariableNames();